home *** CD-ROM | disk | FTP | other *** search
/ Programming a Multiplayer FPS in DirectX / Programming a Multiplayer FPS in DirectX (Companion CD).iso / DirectX / dxsdk_oct2004.exe / dxsdk.exe / Samples / C++ / Direct3D / EffectEdit / MainFrm.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-09-27  |  2.7 KB  |  92 lines

  1. // MainFrm.h : interface of the CMainFrame class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. #if !defined(AFX_MAINFRM_H__7B69EEA0_267A_429D_A21F_2420814F24DF__INCLUDED_)
  6. #define AFX_MAINFRM_H__7B69EEA0_267A_429D_A21F_2420814F24DF__INCLUDED_
  7.  
  8. #if _MSC_VER > 1000
  9. #pragma once
  10. #endif // _MSC_VER > 1000
  11.  
  12. class CMySplitterWnd : public CSplitterWnd
  13. {
  14. protected:
  15.     CSplitterWnd* m_pSplitterWndPrev;
  16.     CSplitterWnd* m_pSplitterWndNext;
  17.     bool m_bPreserveLastPaneSize;
  18.  
  19. public:
  20.     CMySplitterWnd() { m_bPreserveLastPaneSize = false; }
  21.     void SetPrev(CSplitterWnd* pWnd) { m_pSplitterWndPrev = pWnd; }
  22.     void SetNext(CSplitterWnd* pWnd) { m_pSplitterWndNext = pWnd; }
  23.     virtual void ActivateNext(BOOL bPrev = FALSE);
  24.     virtual void RecalcLayout();
  25.     virtual void StopTracking(BOOL bAccept);
  26.  
  27.     void PreserveLastPaneSize() { m_bPreserveLastPaneSize = true; }
  28. };
  29.  
  30. class CMainFrame : public CFrameWnd
  31. {
  32.     
  33. protected: // create from serialization only
  34.     CMainFrame();
  35.     DECLARE_DYNCREATE(CMainFrame)
  36.  
  37. // Attributes
  38. public:
  39.  
  40. // Operations
  41. public:
  42.  
  43. // Overrides
  44.     // ClassWizard generated virtual function overrides
  45.     //{{AFX_VIRTUAL(CMainFrame)
  46.     public:
  47.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  48.     protected:
  49.     virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
  50.     //}}AFX_VIRTUAL
  51.  
  52. // Implementation
  53. public:
  54.     virtual ~CMainFrame();
  55. #ifdef _DEBUG
  56.     virtual void AssertValid() const;
  57.     virtual void Dump(CDumpContext& dc) const;
  58. #endif
  59.     void ActivateTextView();
  60.     void ActivateErrorsView();
  61.     void ActivateOptionsView();
  62.     void SelectLine(int iLine);
  63.     void TextViewUpdateFont();
  64.     void SetRowCol(int iRow, int iCol);
  65.  
  66. protected:  // control bar embedded members
  67.     CStatusBar  m_wndStatusBar;
  68.     CToolBar    m_wndToolBar;
  69.  
  70. // Generated message map functions
  71. protected:
  72.     CMySplitterWnd m_wndSplitterLeft;
  73.     CMySplitterWnd m_wndSplitterRight;
  74.     CMySplitterWnd m_wndSplitterMain;
  75.     //{{AFX_MSG(CMainFrame)
  76.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  77.     afx_msg void OnRender();
  78.     afx_msg void OnViewChangeDevice();
  79.     afx_msg void OnSize(UINT nType, int cx, int cy);
  80.     afx_msg void OnClose();
  81.     afx_msg void OnActivateApp(BOOL bActive, DWORD dwThreadID);
  82.     //}}AFX_MSG
  83.     DECLARE_MESSAGE_MAP()
  84. };
  85.  
  86. /////////////////////////////////////////////////////////////////////////////
  87.  
  88. //{{AFX_INSERT_LOCATION}}
  89. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  90.  
  91. #endif // !defined(AFX_MAINFRM_H__7B69EEA0_267A_429D_A21F_2420814F24DF__INCLUDED_)
  92.